package com.cuixichang.minimalism.service;

import com.cuixichang.minimalism.transfer.dto.IPermissionDTO;
import com.cuixichang.minimalism.transfer.po.IPermission;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
import java.util.function.BiConsumer;
import java.util.function.Function;
/**
 * 系统权限表服务接口
 *
 * @author cuixichang
 * @date 2024-12-18
 */
public interface IPermissionService{

    IPermissionDTO selectById(Long id);

    IPermissionDTO selectOne(IPermissionDTO iPermissionDTO);

    List<IPermissionDTO> selectByIds(List<Long> ids);

    List<IPermissionDTO> selectList(IPermissionDTO iPermissionDTO);

    List<IPermissionDTO> selectList(IPermissionDTO iPermissionDTO, BiConsumer<IPermission, QueryWrapper<IPermission>> consumer);

    Page<IPermissionDTO> selectPage(IPermissionDTO iPermissionDTO, long pageSize, long pageNo);

    Page<IPermissionDTO> selectPage(IPermissionDTO iPermissionDTO, long pageSize, long pageNo, BiConsumer<IPermission, QueryWrapper<IPermission>> consumer);

    int deleteById(Long id);

    int deleteByIds(List<Long> ids);

    int deleteByCondition(IPermissionDTO iPermissionDTO);

    int deleteByCondition(IPermissionDTO iPermissionDTO, BiConsumer<IPermission, QueryWrapper<IPermission>> consumer);

    IPermissionDTO insert(IPermissionDTO iPermissionDTO);

    IPermissionDTO insertHasOption(IPermissionDTO iPermissionDTO, Function<IPermissionDTO,IPermissionDTO> preOption);

    int updateById(IPermissionDTO iPermissionDTO);

    int updateById(IPermissionDTO iPermissionDTO, BiConsumer<IPermission, UpdateWrapper<IPermission>> consumer);
}